package me.xplabs.model.skill 
{
	import flash.utils.getTimer;
	/**
	 * ...
	 * @author xiaohan
	 */
	public class Skill extends BaseSkill 
	{
		private var _total:uint;
		private var _now:uint;
		/** 是否可以施放技能*/
		public var isUse:Boolean;
		public function Skill() 
		{
			
		}
		public function updateCdGap():void
		{
			if (!isUse)
			{
				var prev:uint = getTimer() - _now;
				_total += prev;
				var gap:uint = int(_total / (cdGap * 1000));
				if (gap >= 1)
				{
					_total -= gap * (cdGap * 1000);
					isUse = true;
				}
			}
			_now = getTimer();
		}
		/**
		 * 使用技能
		 */
		public function useSkill():void
		{
			isUse = false;
			_total = 0;
		}
		
	}

}